package Review;
import java.sql.SQLOutput;
import java.util.Comparator;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Wukong
 * Date: 2022-06-04
 * Time: 16:08
 */
public class StudentTh {

    String name;
    int score;

    public StudentTh(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public void Sort(Comparable[]arry){
        for (int i = 0; i <arry.length-1; i++) {
            for (int j = 0; j < arry.length-1-i; j++) {
                if (arry[j].compareTo(arry[j+1])>0){

                    Comparable temp=arry[j];
                    arry[j]=arry[j+1];
                    arry[j+1]=temp;
                }
            }
        }
    }

    public static void main(String[] args) {

        StudentTh[] students=new StudentTh[3];
        students[0]=new StudentTh("lisa",20);
        students[1]=new StudentTh("lusi",19);
        students[2]=new StudentTh("luse",18);
        



        }




}
